package com.jade.store.pay.service.tencent.service;

import com.jade.store.pay.service.tencent.common.Configure;
import com.jade.store.pay.service.tencent.protocol.pay_protocol.ScanPayReqData;
import com.jade.store.pay.service.tencent.protocol.pay_unifiedorder.PayUnifiedorderReqData;

/**
 * User: 金亚
 * Date: 2014/10/29
 * Time: 16:03
 */
public class PayUnifiedorderService extends BaseService{

    public PayUnifiedorderService() throws IllegalAccessException, InstantiationException, ClassNotFoundException {
        super(Configure.PAY_UNIFIEDORDER);
    }

    /**
     * 请求支付服务
     * @param payUnifiedorderReqData 这个数据对象里面包含了API要求提交的各种数据字段
     * @return API返回的数据
     * @throws Exception
     */
    public String request(PayUnifiedorderReqData payUnifiedorderReqData) throws Exception {

        //--------------------------------------------------------------------
        //发送HTTPS的Post请求到API地址
        //--------------------------------------------------------------------
        String responseString = sendPost(payUnifiedorderReqData);

        return responseString;
    }
}
